<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        span{
            display: inline-block;
            width: 65px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            border: 1px solid red;
            margin-left: 5px;
            margin-top: 10px;
        }
    </style>
</head>
<body>
    
</body>
</html>
<script>
    // var rows = prompt("请输入行数")
    // var cols = prompt("请输入列数")

    for(i = 1;i<=9;i++){
        for(j=1;j<=i;j++){
        
    document.write('<span>'+i+"x"+j+"="+i*j +'</span>')
}
        document.write(  '<br />')
    }

</script>